package com.han.spring.core.classpath_scan;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.han.spring.core.annotation_di.House;

/**
* @author hanpeng
* @version 创建时间：2020年7月8日 下午3:25:38
* @ClassName 类名称
* @Description 类描述
*/
public class ClasspathScanTest {
	@Test
	public void scanTest() {
		/*ApplicationContext context = new ClassPathXmlApplicationContext("classpath_scan.xml");*/
		AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(AppScanConfig.class);
		ServiceBean serviceBean = context.getBean("serviceBean", ServiceBean.class);
		System.out.println(serviceBean);
		/*System.out.println(house.getHan());
		System.out.println(house.getMap().get("han"));
		System.out.println(house.getContext());*/
	}
}	
